package com.cust.cow.service.impl;

import com.cust.cow.common.BullCollectSemenLog;
import com.cust.cow.common.Result;
import com.cust.cow.mapper.BullCattleMapper;
import com.cust.cow.pojo.bullCattle;
import com.cust.cow.service.BullCattleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BullCattleSeviceImpl implements BullCattleService {

    @Autowired
    private BullCattleMapper bullCattleMapper;
    @Override
    public List<bullCattle> findBullCattleAll() {
        return bullCattleMapper.findBullCattleAll();
    }

    @Override
    public Result insertBullCattle(bullCattle bullCattle) {
        bullCattleMapper.insertBullCattle(bullCattle);
        return new Result(200, "插入成功");
    }

    @Override
    public Result deleteBullCattle(Integer cattleId) {
        bullCattleMapper.deleteBullCattle(cattleId);
        return new Result(200, "删除成功");
    }

    @Override
    public List<BullCollectSemenLog> findBullCattleCs() {
        return bullCattleMapper.findBullCattleCs();
    }

    @Override
    public BullCollectSemenLog findBullCattleById(Integer cattleId) {
        return bullCattleMapper.findBullCattleById(cattleId);
    }


}
